package kr.co.goodwilldd.controller.common;

import kr.co.goodwilldd.service.menus.IMenuService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping(value = "menu")
public class MenuController {

	
	private static final Logger logger = LoggerFactory
			.getLogger(MenuController.class);
	
	@Autowired
	IMenuService iMenuService;
	
	@RequestMapping(value = "g{menuSeq:\\S*}")
	public String forward(Model model, @PathVariable("menuSeq") Integer menuSeq) {
		return "forward:"+(iMenuService.getMenu(menuSeq)).getLinks();
	}
}
